package cn.myjerry.thread.info;

/**
 * 优先级：概率  不是绝对的先后顺序
 * Thread.MAX_PRIORITY	10
 * Thread.NORM_PRIORITY	5（默认）
 * Thread.MIN_PRIORITY	1
 * 
 * setPriority()
 * getPriority()
 * @author Jerry
 *
 */

public class InfoDemo02 {
	public static void main(String[] args) throws InterruptedException {
		MyThread it1 = new MyThread();
		Thread proxy1 = new Thread(it1, "It1");
		MyThread it2 = new MyThread();
		Thread proxy2 = new Thread(it2, "It2");
		
		proxy1.setPriority(Thread.MIN_PRIORITY);
		proxy2.setPriority(Thread.MAX_PRIORITY);
		
		proxy1.start();
		proxy2.start();
		
		Thread.sleep(5);
		it1.stop();
		it2.stop();
	}
}
